# -*- coding: utf-8 -*-(for Scipe)
#   glider without electric motor
#____________flight control functions depending on @M1/ glider  with electric motor)_____________________________________
#use the stick M1 and make the flight variables:
#  courb  = flap, change the camber of the wing
#  thr = electric motor value -100 100
#  brake=  airbrake  value 0 100
DEF 
courb.trim: INIT 0.00
thr  = -100.0  #off
IF  vol  # any flight condition prefixed with "vol" @M1= courb = the 4th axis
	courb	  ADD	@M1  courb.trim: #  4 axis ! courb >0 with the stick up
ENDIF
brake.prof: INIT 0
IF  att #landing
	brake LINE @M1 -100   	0     	0     	0  100  100           # stick 1 /upper travel -> brake control (value 0  +100)
 	courb LINE @C3  -100 -100    +100 0                           # static position of the flaps controled with cursor 3
	prof  ADDS  brake brake.prof:
ENDIF

